package yueyong.salarymanagement.module.business.salary.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import yueyong.salarymanagement.module.business.salary.domain.entity.EmployeeSalaryEntity;
import yueyong.salarymanagement.module.business.salary.domain.vo.SalayIdVO;

import java.sql.Timestamp;
import java.util.List;

/**
 * Copyright: yueyong (c) 2022
 *
 * @author he.shaorong
 * @version 1.0
 * @date 2022/2/4
 */
@Mapper
@Component
public interface EmployeeSalaryDao extends BaseMapper<EmployeeSalaryEntity> {
    List<EmployeeSalaryEntity> getEmployeeSalaryEntityBySalaryId(@Param("uid") long uid, @Param("salaryId")long salaryId);

    List<EmployeeSalaryEntity> getEmployeeSalaryEntityBySalaryIdAndEmployeeId(@Param("uid") long uid, @Param("salaryId")long salaryId
            , @Param("employeeId")long employeeId);


    List<EmployeeSalaryEntity> getInitEmployeeSalaryEntityBySalaryId(@Param("uid") long uid, @Param("salaryId")long salaryId);

    List<EmployeeSalaryEntity> getLatestEmployeeSalaryEntity(@Param("uid") long uid);

    List<EmployeeSalaryEntity> getSpecifyDateEmployeeSalaryEntity(@Param("uid") long uid
            , @Param("startTime") Timestamp startTime, @Param("endTime") Timestamp endTime, @Param("sendType") int sendType);

    List<SalayIdVO> getSpecifyDateSalaryId(@Param("uid") long uid
            , @Param("startTime") Timestamp startTime, @Param("endTime") Timestamp endTime);

}
